const baseUrl = "http://124.93.196.45:10001/"

function requestPromise(url, resType = 'GET', resData) {
    return new Promise((resolve, reject) => {
        mui.ajax(baseUrl + url, {
            data: resData,
            headers: {
                'Content-Type': 'application/json'
            },
            dataType: 'json',//服务器返回json格式数据
            type: resType,//HTTP 清求类型timeout:10000,//超时时间没置为10秒；
            success: function (data) {
                resolve(data)
            },
            error: function (xhr, type, errorThrown) {
                reject(xhr)
            }
        });
    })
}